package b3.config
{
	import flash.geom.Point;
	
	public class SectionConfig extends BasicConfig
	{
		//视角锁定
		public static const viewCenterX:Array = [3, 315, -298, 13, 638, -714, 0];
		public static const viewCenterY:Array = [463, 259, 321, 127, 518, 536, 805];
		
		public var index:int;
		
		public var globalPoint:Array;
		
		public var size:Array;
		
		public var availablePoint:Array;
		
		public var requirePopulation:int;
		
		public var unlockPrompt:Array;
		
		public var sectionPoints:Array;

		public function SectionConfig(configXML:XML)
		{
			super(configXML);
			getSectionPts();
		}
		
		private function getSectionPts():void
		{
			sectionPoints = new Array();
			for (var i:int = 0; i < availablePoint.length; i++)
			{
				if (availablePoint[i] == 1)
				{
					var x:int = parseInt(globalPoint[0]) + i % parseInt(size[0]);
					var y:int = parseInt(globalPoint[1]) + int(i / size[0]);
					sectionPoints.push(new Point(x, y));
				}
			}
		}
	}
}